/* 1678. 设计 Goal 解析器 */
/**
 * @param {string} command
 * @return {string}
 */
var interpret = function (command) {
	let ret = ''
	for (let i = 0; i < command.length; i++) {
		if (command[i] === '(') {
			if (command[i + 1] === ')') {
				ret += 'o'
				i++
			} else {
				ret += 'al'
				i += 3
			}
		} else {
			ret += command[i]
		}
	}
	return ret
}
const ret = interpret('G()()()()(al)')
console.log('interpret :>>', ret)
